package com.aistar.hotel.service.impl;


import com.aistar.common.util.IdWorker;
import com.aistar.hotel.entity.HotelRoom;
import com.aistar.hotel.mapper.HotelRoomMapper;
import com.aistar.hotel.service.HotelRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * Created by wubin on 2019/6/23.
 */
@Service
@Transactional
public class HotelRoomServiceImpl implements HotelRoomService {
    @Autowired
    private HotelRoomMapper hotelRoomMapper;
    @Autowired
    private IdWorker idWorker;
    @Override
    public List<HotelRoom> findAll(String roomname) {
        return hotelRoomMapper.findAll(roomname);
    }

    @Override
    public HotelRoom findById(String id) {
        return hotelRoomMapper.findById(id);
    }

    @Override
    public void save(HotelRoom hotelRoom) {


        hotelRoomMapper.save(hotelRoom);
    }

    @Override
    public void delete(String id) {
hotelRoomMapper.delete(id);
    }

    @Override
    public void update(HotelRoom hotelRoom) {

        hotelRoomMapper.update(hotelRoom);
    }
}
